home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / unzip42.zip / ATARI.ZIP / ATARIST.PAT next >
Text File  |  1992-02-10  |  6KB  |  177 lines

  1. *** mapname.c.orig    Fri Feb  7 22:56:19 1992
  2. --- mapname.c    Fri Feb  7 23:06:32 1992
  3. ***************
  4. *** 209,215 ****
  5. --- 209,219 ----
  6.   #ifdef MACOS
  7.                       strcat(cdp, ":");
  8.   #else /* !MACOS */
  9. + #if    ATARI_ST
  10. +                     strcat(cdp, "\\");
  11. + #else  /* !ATARI_ST */
  12.                       strcat(cdp, "/");
  13. + #endif /* ?ATARI_ST */
  14.   #endif /* ?MACOS */
  15.   #endif /* ?VMS */
  16.                   }               /***** FALL THROUGH to ':' case  **** */
  17. *** unzip.c.orig    Fri Feb  7 22:56:20 1992
  18. --- unzip.c    Fri Feb  7 23:17:06 1992
  19. ***************
  20. *** 119,124 ****
  21. --- 119,131 ----
  22.   byte *stack;
  23.   #else
  24.   byte suffix_of[HSIZE + 1];      /* also s-f length_nodes (smaller) */
  25. + #if    ATARI_ST
  26. + /* now this is the third time I had to fix this...
  27. +  * does NOBODY understand that you C_A_N_N_O_T reuse a byte array
  28. +  * for anything of larger type because of possible alignment problems?
  29. +  */
  30. + int    HadToAlignStackElseItCrashed;
  31. + #endif
  32.   byte stack[HSIZE + 1];          /* also s-f distance_nodes (smaller) */
  33.   #endif
  34.   
  35. *** unzip.h.orig    Fri Feb  7 22:56:21 1992
  36. --- unzip.h    Sat Feb  8 00:47:55 1992
  37. ***************
  38. *** 27,34 ****
  39.   #  if defined(THINK_C) || defined(MPW) /* for Macs */
  40.   #    include <stddef.h>
  41.   #  else
  42. ! #    include <sys/types.h> /* off_t, time_t, dev_t, ... */
  43. ! #    include <sys/stat.h>  /* Everybody seems to need this. */
  44.   #  endif
  45.   #endif                   /*   This include file defines
  46.                             *     #define S_IREAD 0x0100  (owner may read)
  47. --- 27,39 ----
  48.   #  if defined(THINK_C) || defined(MPW) /* for Macs */
  49.   #    include <stddef.h>
  50.   #  else
  51. ! #    ifdef ATARI_ST
  52. ! #      include <stddef.h>
  53. ! #      define __STDC__ 1 /* see note below */
  54. ! #    else
  55. ! #      include <sys/types.h> /* off_t, time_t, dev_t, ... */
  56. ! #      include <sys/stat.h>  /* Everybody seems to need this. */
  57. ! #    endif
  58.   #  endif
  59.   #endif                   /*   This include file defines
  60.                             *     #define S_IREAD 0x0100  (owner may read)
  61. ***************
  62. *** 71,76 ****
  63. --- 76,95 ----
  64.       And now, our MS-DOS and OS/2 corner:
  65.     ---------------------------------------------------------------------------*/
  66.   
  67. + /*
  68. +  * How comes poor little Atari ST 's playing with these boys of the 'hood ?
  69. +  *
  70. +  * For everybody: TURBO C for the Atari ST also defines __TURBOC__
  71. +  *                You (yes YOU!!) may NOT RELY ON __TURBOC__ to tell
  72. +  *                that this is MSDOS or whatever!
  73. +  */
  74. + #ifdef ATARI_ST
  75. + /* KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE    */
  76. + #undef __TURBOC__
  77. + #endif
  78. + /* FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME  */
  79. + /*       vvvvvv    */
  80.   #ifdef __TURBOC__
  81.   #  define DOS_OS2             /* Turbo C under DOS, MSC under DOS or OS2    */
  82.   #  include <sys/timeb.h>      /* for structure ftime                        */
  83. ***************
  84. *** 123,132 ****
  85.   #    ifdef MTS
  86.   #      include <sys/file.h>     /* MTS uses this instead of fcntl.h */
  87.   #    else
  88. ! #      include <fcntl.h>
  89.   #    endif
  90.   #  endif
  91.   #endif
  92.   /*
  93.    *   fcntl.h (above):   This include file defines
  94.    *                        #define O_BINARY 0x8000  (no cr-lf translation)
  95. --- 142,162 ----
  96.   #    ifdef MTS
  97.   #      include <sys/file.h>     /* MTS uses this instead of fcntl.h */
  98.   #    else
  99. !      /*
  100. !       * FIXME:
  101. !       *
  102. !       * Again, just by not being VMS, V7 or MTS, the little Atari ST
  103. !       * winds up here (and everybody else too). WHOEVER NEEDS this stuff,
  104. !       * DECLARE YOURSELF and DONT rely on this kind of negative logic!
  105. !       */
  106. ! #      ifndef ATARI_ST
  107. !          /* KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE KLUDGE    */
  108. ! #        include <fcntl.h>
  109. ! #      endif
  110.   #    endif
  111.   #  endif
  112.   #endif
  113.   /*
  114.    *   fcntl.h (above):   This include file defines
  115.    *                        #define O_BINARY 0x8000  (no cr-lf translation)
  116. ***************
  117. *** 159,164 ****
  118. --- 189,203 ----
  119.       And finally, some random extra stuff:
  120.     ---------------------------------------------------------------------------*/
  121.   
  122. + /* FIXME:
  123. +  *
  124. +  * As used by Turbo C (at least for the Atari ST),
  125. +  * __STDC__ means that the compiler has been RESTRICTED to standard ANSI C.
  126. +  *
  127. +  * What we want here is: do we have a compiler which has ANSI C prototypes
  128. +  * and includes.
  129. +  * So better use somthing like: ANSI_C or so...
  130. +  */
  131.   #ifdef __STDC__
  132.   #  include <stdlib.h>      /* standard library prototypes, malloc(), etc. */
  133.   #  include <string.h>      /* defines strcpy, strcmp, memcpy, etc. */
  134. ***************
  135. *** 169,174 ****
  136. --- 208,245 ----
  137.   #endif
  138.   
  139.   
  140. + /* Incidently, for Turbo C on the Atari ST we just order the following items:
  141. +  */
  142. + #if ATARI_ST
  143. + #  include <time.h>
  144. + /* the following includes are really specific for Turbo C 2.0 !!      */
  145. + #  include <ext.h>      /* this gives us stat()                         */
  146. + #  include <tos.h>      /* OS specific functions (Fdup)                 */
  147. + #  define MSDOS         1               /* from here on. */
  148. + #  define DOS_OS2       1               /* from here on. */
  149. + #  define __TURBOC__    1               /* from here on. */
  150. + /*
  151. +  * FIXME:
  152. +  * Although the Atari ST (MC68000) and Turbo C use 16 bit ints,
  153. +  * we have to use NOTINT16, since its an high-endian, and therefore
  154. +  * we cannot read the intel little-endian structs.
  155. +  * For that reason, NOTINT16 is another misnomer.
  156. +  */
  157. + #  define NOTINT16      1
  158. + #  ifndef S_IFMT
  159. + #  define S_IFMT        (S_IFCHR|S_IFREG|S_IFDIR)
  160. + #  endif
  161. + #  ifndef O_BINARY
  162. + #  define O_BINARY 0
  163. + #  endif
  164. + /* replace dup by corresponding tos function  */
  165. + #  define       dup             Fdup
  166. + #  define       mkdir           Dcreate
  167. + #endif
  168.   
  169.   
  170.   
  171.